<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title><?php echo $web_title?> - 宁师青柠BBS</title>
    <?php foreach($css as $val){ ?>
     <link rel="stylesheet" href="<?php echo $val?>">
    <?php }?>
  </head>
  <body>
    
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/nsbbs/">青柠BBS</a>
            </div>
        
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="/nsbbs/">首页 <span class="sr-only">(current)</span></a></li>
            </ul>
            <form class="navbar-form navbar-left" action="search.php">
                <div class="form-group">
                <input type="search" name="wd" id="f-con" class="form-control" placeholder="搜索版面、帖子、用户">
                </div>
                <button type="submit" id="find-btn" class="btn btn-default">搜索</button>
                <select id="key" name="k">
                    <option>版面</option>
                    <option>帖子</option>
                    <option>用户</option>
                </select>
            </form>
            <ul class="nav navbar-nav navbar-right">
            <?php if($user_data){ ?>
                <li class="user-pic">
                    <a href="usercenter.php" class="link"></a>
                    <img class="img-yuan-x36" src="<?php echo PHOTO_PATH.$user_data['photo']?>">
                    <span <?php if($user_data['news']){echo 'class="red-dot"';}?> id="ns-user"><?php echo htmlspecialchars($user_data['user'])?></span>
                </li>
                <li>&nbsp;</li>
                <li><a href="javascript:logout();">退出</a></li>
                <li><a href="selfmail.php">私信</a></li>
            <?php if($user_data['job']){ ?>
                <li><a style="padding:0;margin:15px;display:inline-block" target="_blank" href="admin/admin.php" <?php if($user_data['state']['all']){echo 'class="red-dot"';}?>>后台管理</a></li>
            <?php } 
                }else{ ?>
                <li><a href="login.php">登录</a></li>
                <li><a href="register.php">注册</a></li>
            <?php } ?>
            </ul>
            </div>
        </div>
    </nav>